using Mathmall.Administration.common;
using Mathmall.Administration.Models;
using Mathmall.Administration.Vo;

namespace Mathmall.Administration.Service;

public interface IAttrService
{
    /// <summary>
    /// 保存属性信息vo
    /// </summary>
    /// <param name="attrVo"></param>
    /// <returns></returns>
    Task<int> AddAttr(AttrVo attrVo);

    /// <summary>
    /// 分页查询属性
    /// </summary>
    /// <param name="pageIndex"></param>
    /// <param name="pageSize"></param>
    /// <param name="catalogID"></param>
    /// <param name="condition"></param>
    /// <returns></returns>
    Task<PaginatedList<AttrVo>> PageNationQuery(int pageIndex, int pageSize, int catalogID, string condition);

    /// <summary>
    /// 根据分类id查询属性信息
    /// </summary>
    /// <param name="catalogId"></param>
    /// <returns></returns>
    Task<List<AttrVo>?> GetAttrByCatalogId(int catalogId);

    /// <summary>
    /// 修改属性值
    /// </summary>
    /// <param name="attrVo"></param>
    /// <returns></returns>
    Task<int> UpdateAttr(AttrVo attrVo);

    /// <summary>
    /// 删除属性
    /// </summary>
    /// <param name="attrIds"></param>
    /// <returns></returns>
    Task<int> DeleteAttr(List<int> attrIds);
}